@extends('layout.index')
@section('title','后台用户订单管理')
@section('content')
<style>
.pagination {
  display: inline-block;
  padding-left: 0;
  /*margin: 20px 0;*/
  border-radius: 4px;
  height:20px;
  /*width:auto;*/
  margin-left:0px;
}
.pagination > li {
  display: inline;
}
.pagination > li > a,
.pagination > li > span {
  position: relative;
  float: left;
  padding: 6px 12px;
  margin-left: -1px;
  line-height: 1.42857143;
  color: #337ab7;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #ddd;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
  margin-left: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
  /*border-top-right-radius: 4px;*/
  border-bottom-right-radius: 4px;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
  z-index: 3;
  color: #23527c;
  background-color: #eee;
  border-color: #ddd;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  z-index: 2;
  color: #fff;
  cursor: default;
  background-color: #337ab7;
  border-color: #337ab7;
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
  color: #333;
  cursor: not-allowed;
  background-color: #fff;
  border-color: #ddd;
}
</style>
  <div class="mws-panel grid_8">
                  <div class="mws-panel-header">
                      <span><i class="icon-table"></i>用户订单管理</span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
                        <form action="/admin/order/order" method="get" > <div id="DataTables_Table_1_length" class="dataTables_length"><label>每页显示<select name="num" size="1" aria-controls="DataTables_Table_1"><option value="10"  @if(!empty($request['num']) && $request['num'] == 10)
                                                        selected
                                            @endif
                        >10</option><option value="25" @if(!empty($request['num']) && $request['num'] == 25)
                                        selected
                            @endif
                            >25</option><option value="50" @if(!empty($request['num']) && $request['num'] == 50)
                                                        selected
                                            @endif
                                            >50</option><option value="100"
                            @if(!empty($request['num']) && $request['num'] == 100)
                                        selected
                            @endif
                            >100</option>
                            </select> 条</label></div><div class="dataTables_filter" id="DataTables_Table_1_filter"><label>关键字<input value="{{$request['keywords'] or ''}}" name="keywords" type="text" aria-controls="DataTables_Table_1"> <button class="btn btn_default">查询</button> </label></div><table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info"></form>
                            <thead>
                                <tr role="row"><th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 261px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">用户id</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 332px;" aria-label="Browser: activate to sort column ascending">订单编号</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 313px;" aria-label="Platform(s): activate to sort column ascending">收件人</th>
                                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 223px;" aria-label="Engine version: activate to sort column ascending">收件地址</th>
                                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 223px;" aria-label="Engine version: activate to sort column ascending">商品id</th>
                                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 223px;" aria-label="Engine version: activate to sort column ascending">商品名</th>
                                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 223px;" aria-label="Engine version: activate to sort column ascending">订单状态</th>
                                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 167px;" aria-label="CSS grade: activate to sort column ascending">操作</th></tr>
                            </thead>
                            
                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                        @foreach($res as $k =>$v)
                          <tr class="
                          odd
                          ">
                                    <td class="  sorting_1">{{$v->user_id}}</td>
                                    <td class=" ">{{$v->order_code}}</td>
                                    <td class=" ">{{$v->getman}}</td>
                                    <td class=" ">{{$v->address}}</td>
                                    <td class=" ">{{$v->goods_id}}</td>
                                    <td class=" ">{{$v->goods_name}}</td>
                                    <td class=" ">
                                      @if($v->status == 1)
                                        已下单
                                      @elseif ($v->status == 2)
                                        已取消
                                      @elseif ($v->status == 3)
                                        已退货
                                      @else($v->status == 4)
                                        已换货
                                      @endif
                                    </td>
                                    <td class=""> 
                                    <a href="/admin/order/edit/{{$v->id}}">修改</i></a>| <a href="/admin/order/dele/{{$v->id}}">删除</i></a></td>
                            </tr>
                          @endforeach
                                </tbody></table><div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">

 
                </div>
                </div>
                    </div>
                </div>
@endsection